package models

import "time"

type SysStudent struct {
	ID int `json:"id" gorm:"primary key;not null;AUTO_INCREMENT"`
	StuID int `json:"stu_id" gorm:"unique_index;not null;unique"`		// 学号
	Name string `json:"name" gorm:"index"`
	Gender int `json:"gender" gorm:"type:enum(1,2)"`
	IDCard string `json:"id_card"`
	BankCardNo string `json:"bank_card_no"`
	Dormitory string `json:"dormitory"`
	Political string `json:"political"`
	Nation string `json:"nation"`
	NativePlace string `json:"native_place"`
	HomeAddress string `json:"home_address"`
	Birthday time.Time `json:"birthday"`
	Mobile string `json:"mobile"`
	Email string `json:"email"`
	QQ string `json:"qq"`
	WeChat string `json:"we_chat"`
	FatherName string `json:"father_name"`
	FatherIdCard string `json:"father_id_card"`
	FatherWorkUint string `json:"father_work_uint"`
	FatherMobile string `json:"father_mobile"`
	MatherName string `json:"mather_name"`
	MatherIdCard string `json:"mather_id_card"`
	MatherWorkUint string `json:"mather_work_uint"`
	MatherMobile string `json:"mather_mobile"`
	ClassID int `json:"class_id" gorm:"index"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	Class SysClass `gorm:"ForeignKey:ClassID;AssociationForeignKey:ID" json:"class"`
}
